package com.chenjie.executor.day10;

/**
 * packageName com.chenjie.executor.day10
 *
 * @author chenjie
 * @version JDK 8
 * @className OneTask (此处以class为例)
 * @date 2024/5/27
 * @description TODO
 */
public class TwoTask implements Runnable{
    private Thread thread;

    public Thread getThread() {
        return thread;
    }

    public void setThread(Thread thread) {
        this.thread = thread;
    }

    @Override
    public void run() {

        try {
            thread.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("2");
    }
}
